<?php
class VnExpress extends AutoPick{
	
	public function __construct($files=""){
		parent::__construct($files);
		$this->domain = "vnexpress.net";
	}
	public function getTitle($data){
		$titles = $this->getTagsFromString($data, "a", "class", "link-title");
		if(isset($titles[0])){
			return $titles[0];
		}
		return;
	}
	public function getImage($data){
		$titles = $this->getAttrFromString("src", $data, "img", "class", "img-subject fl");
		if(isset($titles[0])){
			return $titles[0];
		}
		return;
	}
	public function getLink($data){
		$titles = $this->getAttrFromString("href",$data, "a", "class", "link-title");
		if(isset($titles[0])){
			return $titles[0];
		}
		return;
	}
	function getTime($data){
		$times = $this->getTagsFromString($data, "label", "class", "item-time");
		if(isset($times[0])){
			return $times[0];
		}
		return;			
	}
	function getDate($data){
		$dates = $this->getTagsFromString($data, "label", "class", "item-date");
		if(isset($dates[0])){
			return $dates[0];
		}
		return;	
	}
	function getSummarization($data){
		$dates = $this->getTagsFromString($data, "p", "", "");
		if(isset($dates[1])){
			return $dates[1];
		}
		return;	
	}			
}